﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.IO;
 

namespace SJHT_CustomerVoiceDownLoad.Common
{
    class SMSSend
    {
        public void PostMsg(string userId,string userCode,string phoneNum,string msg)
        {
            string corpCode = "0000000001"; // 企业编码
            string serviceCode = "0001"; // 业务编码
            string msgID = "20141110121212112"; // 短信的标识（少于32位的数字或字母字符串）
            string phoneNum1 = "15286019179"; // 接收的手机号码
            string smsMsg = "455665"; // 短信内容

            //// 拼凑URL字串，并进行编码
            //string content = "corpCode=" + corpCode + "&serviceCode=" + serviceCode
            //        + "&msgID=" + msgID + "&phoneNum=" + phoneNum1 + "&smsMsg="
            //        + URLEncoder.encode(smsMsg, "UTF-8");


             WebClient wc = new WebClient();
             string uri = "http://192.168.0.35/cims30/rss.txt";
             Stream stream = wc.OpenWrite(uri, "PUT");
             StreamWriter sw = new StreamWriter(stream);
             sw.WriteLine("HelloWorldHelloWorldHelloWorldHelloWorld");
             sw.Flush();
             sw.Close();


             
        }
         
    }
}
